
<%@ page language="java"  contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>

<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/tld/struts-nested" prefix="nested"%>

<%@ taglib uri="/WEB-INF/tld/jstl/c" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/jstl/fn" prefix="fn"%>
<%@ taglib uri="/WEB-INF/tld/jstl/fmt" prefix="fmt"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<title>订单搜索</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/admin/css/public.css"/>
<link rel="stylesheet" type="text/css" href="/admin/css/manage.css"/>

<script  type="text/javascript"  language="javascript">
   
  var pageObj;
  var hiddenLink;
   function topage(hiddenLink,pageObj)
   {
      
       
     var formObj=document.forms['searchForm'];
     
     var page=formObj.elements(pageObj).value;
     
     var hiddenLink=formObj.elements(hiddenLink).value;
     

     
      if(page!=null&&page!='')
     {

       if(!isNotNumReg(page))
       {
         var link=hiddenLink+"&page="+page;
        window.location.href = link;
       }
        else
       {
         alert('您输入的页码只能是数字!');
         return false;
       }
     }
     else
     {
        alert("页码不能为空!");
      }
      
      
   }
</script>
<SCRIPT src="/command/calendar/calendar.js" type=text/javascript></SCRIPT>

<SCRIPT src="/command/calendar/calendar-en.js" type=text/javascript></SCRIPT>

<SCRIPT src="/command/calendar/calendar-setup.js" type=text/javascript></SCRIPT>

<SCRIPT src="/command/calendar/changebg.js" type=text/javascript></SCRIPT>
<script type="text/javascript" src="../../command/calendar/date.js"></script>
</head>



<html:base/>

<body>
<div>
<%--<iframe  frameborder="0"  width= "100%" scrolling="no" src="top.jsp" height="66" allowTransparency="true"></iframe>--%>
</div>
<div style="height:8px; margin-top:-12px;"></div>
<div class="wzts">  </div>
<div>
  <%--<div class="main_left">
      <iframe  frameborder="0"  width= "100%" scrolling="no" src="left.jsp" height="1350"></iframe>
  </div>--%>
  
  <div class="main_content">
    <div class="box">
     <p> </p>
    </div>
	<div class="box520">
	    <html:form action="/admin/orderManage/ebbOrderManageF.do?action=search">
	    
		<div class="box2">
		  
		 <ul>
		  <li class="serch_title">订单搜索</li>
		  <li class="serch_contant_1">
		     订单号：&nbsp;
		       
		       <html:text property="orderDetailIdStr" styleClass="input3"></html:text>
			  &nbsp;&nbsp;&nbsp;&nbsp;交易状态：&nbsp;&nbsp;
			  <html:select property="orderStatutsStr">
			      <html:option value="-1">请选择交易状态</html:option>
			      <html:option value="1">未付款的订单</html:option>
			      <html:option value="2">已付款的订单</html:option>
			      <html:option value="3">已发货的订单</html:option>
			      <html:option value="4">已完成的订单</html:option>
			      <html:option value="5">已作废的订单</html:option>
			  </html:select>
			  </li>
		  <li class="serch_contant-1">
			  买家会员名：
			  <html:text property="orderUserIdStr" styleClass="input3"></html:text>
			  &nbsp;&nbsp;&nbsp;&nbsp;购买时间：&nbsp;&nbsp;
			  
			   <html:text property="orderDetailTimeStr" style="width:80px" onclick="calendar();"></html:text>
			  -
			  <html:text property="orderDetailEndTimeStr" style="width:80px" onclick="calendar();"></html:text>
			  (格式：2008-01-05)
			  </li>
		      <li style=" height:30px; margin-top:4px; padding-left:90px;">
		       <html:submit value=" " style="background-image: url('../../site/images/serch.gif');border:0px;width:69px;cursor:hand;" title="搜索"></html:submit>
		      </li>
		  </ul>
		</div>
		</html:form>
	
	
	<logic:present name="orderDetailList">
		<table cellspacing="1" class="flb box3">
		  <tr class="bg">
			<td>订单号</td>
			<td >买家用户名</td>
			<td>收货人姓名</td>
			<td>金额总计</td>                          
			<td>付款方式</td>
			<td>收货方式</td>
			<td>下单时间</td>
			<td>订单状态</td>
		  </tr>
		  
	    <logic:iterate id="orderDetailList" name="orderDetailList">
		  <tr class="bg1">
				<td title="订单详情ID">
					<a href="/admin/orderManage/ebbOrderManageF.do?action=toupdate&id=${orderDetailList.id}&bkAction=${param['action']}&bkOrderStatuts=${param['orderStatuts']}" target="_self">
						<bean:write name="orderDetailList" property="id"/>
					</a>
				</td>
			<td><bean:write name="orderDetailList" property="orderUserId"/></td>
			<td><c:out value="${orderDetailList.order.orderReciverInf.reciverName}"/></td>
			<td class="zs"><c:out value="${orderDetailList.orderDetailPrice}"/>元</td>
			<td> <c:out value="${orderDetailList.payAccount.bankName}"/> </td>
			<td><c:out value="${orderDetailList.deliveryPrice.deliveryType.deliveryTypeName}"/></td>
			<td><c:out value="${orderDetailList.orderDetailTime}"/></td>
			<td>
			  <c:if test="${orderDetailList.orderStatuts==1}">
			     <c:out value="未付款"></c:out>
			  </c:if>
			  
			   <c:if test="${orderDetailList.orderStatuts=='2'}">
			     <c:out value="已付款"></c:out>
			  </c:if>
			  
			   <c:if test="${orderDetailList.orderStatuts=='3'}">
			     <c:out value="已发货"></c:out>
			  </c:if>
			  
			   <c:if test="${orderDetailList.orderStatuts=='4'}">
			     <c:out value="已完成"></c:out>
			  </c:if>
			  
			   <c:if test="${orderDetailList.orderStatuts=='5'}">
			     <c:out value="已作废"></c:out>
			  </c:if>
			</td>
		  </tr>
		</logic:iterate>
		</table>
	 </logic:present>
    </div>  
		 <div class="fy">
			   <form id="searchForm" name="searchForm">
			    有 <span class="red1">${recordNum}</span>  条记录 共 <span class="red1">${allPage}</span> 页 &nbsp;&nbsp;|&nbsp;&nbsp; 
			     <%--  首页  --%>
			     <html:link action="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}&curPage=${curPage}&backPage=${backPage}&nextPage=${nextPage}&page=${page}&pageSize=${pageSize}" >首页</html:link>
			     <%--  上一页  --%>
			     <html:link action="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}&curPage=${curPage}&backPage=${backPage}&nextPage=${nextPage}&page=${page}&pageSize=${pageSize}&doit=backPage" >上一页</html:link>
		             
		          <%--  页码循环 --%>
		          <c:forEach begin="${1}" end="${allPage}" var="page" varStatus="pageCount">
		                 <html:link action="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}&curPage=${curPage}&backPage=${backPage}&nextPage=${nextPage}&page=${pageCount.index}&pageSize=${pageSize}" >
		                 
		                 <c:if test="${curPage==page}">
		                  <font color="red" class="one"><c:out value="${pageCount.index}"></c:out></font>
		                 </c:if>
		                  <c:if test="${curPage!=page}">
		                 <c:out value="${pageCount.index}"></c:out>
		                 </c:if>
		                    
		                  </html:link>
		          </c:forEach>   
		             
		         <%--  下一页  --%>             
		         <html:link action="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}&curPage=${curPage}&backPage=${backPage}&nextPage=${nextPage}&page=${page}&pageSize=${pageSize}&doit=nextPage" >下一页</html:link>
		         <%--  尾页  --%>
		         <html:link action="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}&curPage=${curPage}&backPage=${backPage}&nextPage=${nextPage}&page=${allPage}&pageSize=${pageSize}" >尾页</html:link>
		           到
		         
			  <input id="toPage"  name="toPage" type="text" class="input100" />
		    页&nbsp;
		    
		      <input type="button"  value=" " style="background-image: url('images/ck.gif');border:0px;width:58px;cursor:hand;"  title="查看"  onclick="return topage('hiddenLink','toPage');"/>
		      <input id="hiddenLink" name="hiddenLink" type="hidden" value="/admin/orderManage/ebbOrderManageF.do?action=search&orderDetailId=${orderManageFForm.orderDetailIdStr}&dt=${orderManageFForm.orderDetailTimeStr}&edt=${orderManageFForm.orderDetailEndTimeStr}&orderStatuts=${orderManageFForm.orderStatutsStr}&orderUserId=${orderManageFForm.orderUserIdStr}" />	    
		     </form>    	     
		    </div>   	
  </div>
</div>
<div>
<%--<iframe  frameborder="0"  width= "100%" scrolling="no" src="foot.jsp" height="100" allowTransparency="true"></iframe>--%>
</div>
<logic:present name="mymsg">
		   <bean:write name="mymsg" filter="false"/>
</logic:present>

</body>
</html:html>
